/*创建触发器函数*/
create or replace function delete_id()
returns trigger as $$
begin
	delete from cargos where id = old.id;
	return old;
end;
$$
language plpgsql;

/*创建触发器*/
create trigger delete_trigger
after delete on id
for each row execute procedure delete_id();
